package com.rw.action.user;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class LogoutAction extends ActionSupport {
	private String result;

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}
	
	public String execute(){
		Map<String,Object> session = ActionContext.getContext().getSession();
		if(session.get("UserState")==null)
			return ERROR;
		session.remove("UserState");
		session.remove("sessionFavorite");
		session.remove("sessionCart");
		return SUCCESS;
	}

}
